home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.uwo.ca!usenet
- From: Sharon Wang <swang1@julian.uwo.ca>
- Newsgroups: comp.lang.c++
- Subject: HELP: A basic question
- Date: 10 Apr 1996 06:42:20 GMT
- Organization: UWO, London, Canada
- Message-ID: <4kfl8c$nju@falcon.ccs.uwo.ca>
- NNTP-Posting-Host: ts3-30.slip.uwo.ca
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Authenticated: swang1@ts3-30.slip.uwo.ca
- X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
-
- hello worlf, i have the following code which compiles ok but causes
- segmentation fault:
-
- class T{
- ...
- public:
- ...
- T deform();
- };
-
- T T::deform(void)
- {
- T c;
- ...
- return c; // guess something wrong here
- }
-
- int main(void)
- {
- T a, b;
- ...
- b = a.deform(); // ERROR: segmentation fault! ('=' overloaded ok)
- }
-
- can anyone tell me what's wrong with the code, or please tell me
- if this is not the right place to post.
-
- sharon
-
-
-